﻿<UserControl x:Class="SoftSource.Timecard.Views.EntryManagementView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:converters="clr-namespace:SoftSource.Timecard.Converters"
             xmlns:timecardControls="clr-namespace:SoftSource.Timecard.Controls"
             xmlns:softsourceConverters="clr-namespace:SoftSource.Common.Converters;assembly=SoftSource.Common.Silverlight"
             xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
             xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
             xmlns:Blacklight_Controls="clr-namespace:Blacklight.Controls;assembly=Blacklight.Controls"
             xmlns:input="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input"
             xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
             xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
             xmlns:dataPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             d:DesignWidth="854"
             d:DesignHeight="464">

    <UserControl.Resources>
        <softsourceConverters:FormattedDateConverter x:Key="FormattedDateConverter" />
        <converters:BillingStateIDToEditableConverter x:Key="BillingStateIDToEditableConverter" />
        <converters:BillingStateIDToApprovalConverter x:Key="BillingStateIDToApprovalConverter" />
        <converters:ProjectIDToCategoriesConverter x:Key="ProjectIDToCategoriesConverter" />
        <converters:ProjectIDToCategorySummaryConverter x:Key="ProjectIDToCategorySummaryConverter" />

        <Style x:Key="ApproveHeaderStyle"
               TargetType="dataPrimitives:DataGridColumnHeader">
            <Setter Property="Foreground"
                    Value="#FF000000" />
            <Setter Property="HorizontalContentAlignment"
                    Value="Left" />
            <Setter Property="VerticalContentAlignment"
                    Value="Center" />
            <Setter Property="IsTabStop"
                    Value="False" />
            <Setter Property="SeparatorBrush"
                    Value="#FFC9CACA" />
            <Setter Property="Padding"
                    Value="4" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="dataPrimitives:DataGridColumnHeader">
                        <Grid x:Name="Root">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ColorAnimation Duration="0"
                                                            Storyboard.TargetName="BackgroundRectangle"
                                                            Storyboard.TargetProperty="(Fill).Color"
                                                            To="#FF448DCA" />
                                            <ColorAnimation Duration="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Fill).(GradientStops)[3].Color"
                                                            To="#7FFFFFFF" />
                                            <ColorAnimation Duration="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color"
                                                            To="#CCFFFFFF" />
                                            <ColorAnimation Duration="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color"
                                                            To="#F2FFFFFF" />
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ColorAnimation Duration="0"
                                                            Storyboard.TargetName="BackgroundRectangle"
                                                            Storyboard.TargetProperty="(Fill).Color"
                                                            To="#FF448DCA" />
                                            <ColorAnimation Duration="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color"
                                                            To="#D8FFFFFF" />
                                            <ColorAnimation Duration="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color"
                                                            To="#C6FFFFFF" />
                                            <ColorAnimation Duration="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color"
                                                            To="#8CFFFFFF" />
                                            <ColorAnimation Duration="0"
                                                            Storyboard.TargetName="BackgroundGradient"
                                                            Storyboard.TargetProperty="(Fill).(GradientStops)[3].Color"
                                                            To="#3FFFFFFF" />
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SortStates">
                                    <VisualState x:Name="Unsorted" />
                                    <VisualState x:Name="SortAscending">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0"
                                                             Storyboard.TargetName="SortIcon"
                                                             Storyboard.TargetProperty="Opacity"
                                                             To="1.0" />
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="SortDescending">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0"
                                                             Storyboard.TargetName="SortIcon"
                                                             Storyboard.TargetProperty="Opacity"
                                                             To="1.0" />
                                            <DoubleAnimation Duration="0"
                                                             Storyboard.TargetName="SortIcon"
                                                             Storyboard.TargetProperty="(RenderTransform).ScaleY"
                                                             To="-.9" />
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Rectangle x:Name="BackgroundRectangle"
                                       Fill="#FF1F3B53"
                                       Stretch="Fill"
                                       Grid.ColumnSpan="2" />
                            <Rectangle x:Name="BackgroundGradient"
                                       Stretch="Fill"
                                       Grid.ColumnSpan="2">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint=".7,1"
                                                         StartPoint=".7,0">
                                        <GradientStop Color="#FCFFFFFF"
                                                      Offset="0.015" />
                                        <GradientStop Color="#F7FFFFFF"
                                                      Offset="0.375" />
                                        <GradientStop Color="#E5FFFFFF"
                                                      Offset="0.6" />
                                        <GradientStop Color="#D1FFFFFF"
                                                      Offset="1" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                  Margin="{TemplateBinding Padding}"
                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Text="Approve"
                                               VerticalAlignment="Center"
                                               Grid.Column="0" />
                                    <CheckBox Grid.Column="1"
                                              HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              Margin="3,0"
                                              Checked="ApproveAllEntries_CheckChanged"
                                              Unchecked="ApproveAllEntries_CheckChanged" />
                                </Grid>

                                <Path x:Name="SortIcon"
                                      Fill="#FF444444"
                                      Stretch="Uniform"
                                      HorizontalAlignment="Left"
                                      Margin="4,0,0,0"
                                      VerticalAlignment="Center"
                                      Width="8"
                                      Opacity="0"
                                      RenderTransformOrigin=".5,.5"
                                      Grid.Column="1"
                                      Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z ">
                                    <Path.RenderTransform>
                                        <ScaleTransform ScaleX=".9"
                                                        ScaleY=".9" />
                                    </Path.RenderTransform>
                                </Path>
                            </Grid>
                            <Rectangle x:Name="VerticalSeparator"
                                       Fill="{TemplateBinding SeparatorBrush}"
                                       VerticalAlignment="Stretch"
                                       Width="1"
                                       Visibility="{TemplateBinding SeparatorVisibility}"
                                       Grid.Column="1" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <controlsToolkit:BusyIndicator x:Name="Busy"
                                   HorizontalContentAlignment="Stretch"
                                   VerticalContentAlignment="Stretch">
        <Grid x:Name="LayoutRoot"
              Background="White">

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid HorizontalAlignment="Left"
                  VerticalAlignment="Center"
                  Margin="10,10,0,10">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <controlsToolkit:Expander x:Name="ProjectExpander"
                                          Grid.Row="0"
                                          Header="Project"
                                          IsExpanded="True"
                                          ExpandDirection="Right"
                                          Padding="4,0,0,0"
                                          Margin="0,2"
                                          Style="{StaticResource ExpanderNoButtonStyle}"
                                          Collapsed="NoProject_CheckChanged"
                                          Expanded="NoProject_CheckChanged">
                    <Grid Grid.Column="1"
                          Margin="10,3,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <input:AutoCompleteBox x:Name="ProjectAutoCompleteBox"
                                               Style="{StaticResource AutoCompleteComboBoxStyle}"
                                               MinWidth="160"
                                               ItemsSource="{Binding Projects}"
                                               FilterMode="Contains"
                                               IsTextCompletionEnabled="True"
                                               TextOptions.TextHintingMode="Animated"
                                               VerticalAlignment="Center"
                                               ValueMemberPath="Name">
                            <input:AutoCompleteBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Name}"
                                               VerticalAlignment="Center"
                                               HorizontalAlignment="Left"
                                               Margin="3,0" />
                                </DataTemplate>
                            </input:AutoCompleteBox.ItemTemplate>
                        </input:AutoCompleteBox>
                        <Grid Grid.Column="1"
                              Margin="10,0,0,0"
                              VerticalAlignment="Center">
                            <StackPanel Orientation="Horizontal">
                                <CheckBox x:Name="ProjectActiveCheckBox"
                                          Content="Active"
                                          Margin="4"
                                          VerticalAlignment="Center"
                                          Checked="CheckBoxFilter_CheckChanged"
                                          Unchecked="CheckBoxFilter_CheckChanged"
                                          IsChecked="True" />
                                <CheckBox x:Name="CompletedCheckBox"
                                          Content="Completed"
                                          Margin="4"
                                          VerticalAlignment="Center"
                                          Checked="CheckBoxFilter_CheckChanged"
                                          Unchecked="CheckBoxFilter_CheckChanged" />
                                <CheckBox x:Name="SuspendedCheckBox"
                                          Content="Suspended"
                                          Margin="4"
                                          VerticalAlignment="Center"
                                          Checked="CheckBoxFilter_CheckChanged"
                                          Unchecked="CheckBoxFilter_CheckChanged" />
                                <CheckBox x:Name="DelayedCheckBox"
                                          Content="Delayed"
                                          Margin="4"
                                          VerticalAlignment="Center"
                                          Checked="CheckBoxFilter_CheckChanged"
                                          Unchecked="CheckBoxFilter_CheckChanged" />
                                <CheckBox x:Name="NotStartedCheckBox"
                                          Content="Not Started"
                                          Margin="4"
                                          VerticalAlignment="Center"
                                          Checked="CheckBoxFilter_CheckChanged"
                                          Unchecked="CheckBoxFilter_CheckChanged" />
                                <StackPanel Orientation="Vertical">
                                    <StackPanel DataContext="{Binding SelectedItem, ElementName=ProjectAutoCompleteBox}"
                                                Orientation="Horizontal"
                                                Margin="10,0,0,2"
                                                VerticalAlignment="Center">
                                        <TextBlock Text="Billing Frequency:"
                                                   VerticalAlignment="Center" />
                                        <TextBlock Text="{Binding BillingFrequencyID, Converter={StaticResource BillingFrequencyIDConverter}, ConverterParameter='Frequency'}"
                                                   Margin="3,0,0,0"
                                                   FontWeight="Bold"
                                                   VerticalAlignment="Center" />
                                    </StackPanel>
                                    <StackPanel DataContext="{Binding SelectedItem, ElementName=ProjectAutoCompleteBox}"
                                                Orientation="Horizontal"
                                                Margin="10,2,0,0"
                                                VerticalAlignment="Center">
                                        <TextBlock Text="Last Billed Date:"
                                                   VerticalAlignment="Center" />
                                        <TextBlock Text="{Binding BilledAsOf, Converter={StaticResource FormattedDateConverter}}"
                                                   Margin="3,0,0,0"
                                                   FontWeight="Bold"
                                                   VerticalAlignment="Center" />
                                    </StackPanel>
                                </StackPanel>
                            </StackPanel>
                        </Grid>
                    </Grid>
                </controlsToolkit:Expander>
                <controlsToolkit:Expander x:Name="UserExpander"
                                          Grid.Row="1"
                                          Header="User"
                                          Padding="4,0,0,0"
                                          Margin="0,2"
                                          ExpandDirection="Right"
                                          Style="{StaticResource ExpanderNoButtonStyle}"
                                          Collapsed="NoUser_CheckChanged"
                                          Expanded="NoUser_CheckChanged">
                    <Grid Grid.Column="1"
                          Grid.Row="1"
                          Margin="10,3,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <input:AutoCompleteBox x:Name="UserAutoCompleteBox"
                                               Style="{StaticResource AutoCompleteComboBoxStyle}"
                                               MinWidth="160"
                                               ItemsSource="{Binding Users}"
                                               FilterMode="Contains"
                                               IsTextCompletionEnabled="True"
                                               TextOptions.TextHintingMode="Animated"
                                               VerticalAlignment="Center"
                                               ValueMemberPath="FullName">
                            <input:AutoCompleteBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding FullName}"
                                               VerticalAlignment="Center"
                                               HorizontalAlignment="Left"
                                               Margin="3,0" />
                                </DataTemplate>
                            </input:AutoCompleteBox.ItemTemplate>
                        </input:AutoCompleteBox>
                        <Grid Grid.Column="1"
                              Margin="10,0,0,0"
                              VerticalAlignment="Center">
                            <StackPanel Orientation="Horizontal"
                                        HorizontalAlignment="Left">
                                <CheckBox x:Name="UserActiveCheckBox"
                                          Margin="4"
                                          VerticalAlignment="Center"
                                          Content="Active"
                                          IsChecked="True"
                                          Checked="CheckBoxFilter_CheckChanged"
                                          Unchecked="CheckBoxFilter_CheckChanged" />
                            </StackPanel>
                        </Grid>
                    </Grid>
                </controlsToolkit:Expander>
                <controlsToolkit:Expander x:Name="StartDateExpander"
                                          Grid.Row="2"
                                          Header="Start Date"
                                          Padding="4,0,0,0"
                                          Margin="0,2"
                                          ExpandDirection="Right"
                                          Style="{StaticResource ExpanderNoButtonStyle}">
                    <controls:DatePicker x:Name="StartDatePicker"
                                         Margin="10,3,0,0"
                                         HorizontalAlignment="Left" />
                </controlsToolkit:Expander>
                <controlsToolkit:Expander x:Name="EndDateExpander"
                                          Grid.Row="3"
                                          Header="End Date"
                                          Padding="4,0,0,0"
                                          Margin="0,2"
                                          ExpandDirection="Right"
                                          Style="{StaticResource ExpanderNoButtonStyle}">
                    <controls:DatePicker x:Name="EndDatePicker"
                                         Margin="10,3,0,0"
                                         HorizontalAlignment="Left" />
                </controlsToolkit:Expander>
                <Grid Grid.Row="4"
                      Grid.ColumnSpan="2">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Button Content="Refresh"
                            d:LayoutOverrides="Height"
                            Margin="4"
                            Click="Refresh_Click"
                            Width="100" />
                    <Button Content="Save Entries"
                            d:LayoutOverrides="Height"
                            Grid.Column="1"
                            Width="100"
                            Margin="4"
                            Click="SaveEntries_Click" />
                    <CheckBox Content="View Billed Entries"
                              Visibility="{Binding Converter={StaticResource RoleToVisibilityConverter}}"
                              Grid.Column="2"
                              Margin="4"
                              VerticalAlignment="Center"
                              Checked="BilledEntries_CheckChanged"
                              Unchecked="BilledEntries_CheckChanged" />
                    <Grid Grid.Column="3"
                          VerticalAlignment="Center"
                          Margin="20, 1, 0, 0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"
                                              MinWidth="125" />
                            <ColumnDefinition Width="Auto"
                                              MinWidth="125" />
                        </Grid.ColumnDefinitions>

                        <StackPanel Orientation="Horizontal"
                                    VerticalAlignment="Center">
                            <TextBlock Text="Actual Hours:" />
                            <TextBlock x:Name="ActualHoursTotal"
                                       FontWeight="Bold" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal"
                                    Margin="4,0,0,0"
                                    VerticalAlignment="Center"
                                    Grid.Column="1">
                            <TextBlock Text="Billable Hours:" />
                            <TextBlock x:Name="BillableHoursTotal"
                                       FontWeight="Bold" />
                        </StackPanel>
                    </Grid>
                </Grid>
            </Grid>

            <data:DataGrid Grid.Row="1"
                           x:Name="EntryDataGrid"
                           AutoGenerateColumns="False"
                           ItemsSource="{Binding Entries.Value, Mode=OneWay}"
                           BeginningEdit="EntryDataGrid_BeginningEdit"
                           RowEditEnded="EntryDataGrid_RowEditEnded">
                <data:DataGrid.Columns>
                    <data:DataGridTemplateColumn Header="Project">
                        <data:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding ProjectID, Converter={StaticResource ProjectIDConverter}, ConverterParameter=Name}"
                                           Margin="3,0,3,0"
                                           VerticalAlignment="Center"
                                           HorizontalAlignment="Left" />
                            </DataTemplate>
                        </data:DataGridTemplateColumn.CellTemplate>
                        <data:DataGridTemplateColumn.CellEditingTemplate>
                            <DataTemplate>
                                <timecardControls:ProjectComboBox ProjectID="{Binding ProjectID, Mode=TwoWay}" />
                            </DataTemplate>
                        </data:DataGridTemplateColumn.CellEditingTemplate>
                    </data:DataGridTemplateColumn>
                    <data:DataGridTextColumn Header="Name"
                                             Binding="{Binding UserID, Converter={StaticResource UserIDConverter}, ConverterParameter='FullName'}"
                                             IsReadOnly="True" />
                    <data:DataGridTextColumn Header="Date"
                                             Binding="{Binding EntryDate, Converter={StaticResource FormattedDateConverter}}"
                                             IsReadOnly="True" />

                    <data:DataGridTemplateColumn Header="Category">
                        <data:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding CategoryID, Converter={StaticResource CategoryIDConverter}, ConverterParameter=Name}"
                                           Margin="3,0,3,0"
                                           VerticalAlignment="Center"
                                           HorizontalAlignment="Left" />
                            </DataTemplate>
                        </data:DataGridTemplateColumn.CellTemplate>
                        <data:DataGridTemplateColumn.CellEditingTemplate>
                            <DataTemplate>
                                <timecardControls:CategoryComboBox ItemsSource="{Binding ProjectID, Converter={StaticResource ProjectIDToCategorySummaryConverter}}"
                                                                   CategoryID="{Binding CategoryID, Mode=TwoWay}" />
                            </DataTemplate>
                        </data:DataGridTemplateColumn.CellEditingTemplate>
                    </data:DataGridTemplateColumn>
                    <data:DataGridCheckBoxColumn Header="Overnight"
                                                 Binding="{Binding OvernightStay}"
                                                 IsReadOnly="True" />
                    <data:DataGridTemplateColumn MaxWidth="300"
                                                 Header="Description"
                                                 IsReadOnly="True">
                        <data:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Description}"
                                           TextWrapping="Wrap"
                                           Margin="3,0,3,0"
                                           VerticalAlignment="Center" />
                            </DataTemplate>
                        </data:DataGridTemplateColumn.CellTemplate>
                    </data:DataGridTemplateColumn>
                    <data:DataGridTemplateColumn HeaderStyle="{StaticResource ApproveHeaderStyle}">
                        <data:DataGridTemplateColumn.CellEditingTemplate>
                            <DataTemplate>
                                <CheckBox HorizontalAlignment="Center"
                                          VerticalAlignment="Center"
                                          IsChecked="{Binding BillingStateID, Converter={StaticResource BillingStateIDToApprovalConverter}, Mode=TwoWay}"
                                          IsEnabled="{Binding BillingStateID, Converter={StaticResource BillingStateIDToEditableConverter}, Mode=OneWay}" />
                            </DataTemplate>
                        </data:DataGridTemplateColumn.CellEditingTemplate>
                    </data:DataGridTemplateColumn>
                    <data:DataGridTemplateColumn Header="Review By Admin"
                                                 SortMemberPath="ReviewByAdmin">
                        <data:DataGridTemplateColumn.CellEditingTemplate>
                            <DataTemplate>
                                <CheckBox HorizontalAlignment="Center"
                                          VerticalAlignment="Center"
                                          IsChecked="{Binding ReviewByAdmin, Mode=TwoWay}"
                                          IsEnabled="{Binding BillingStateID, Converter={StaticResource BillingStateIDToEditableConverter}, Mode=OneWay}" />
                            </DataTemplate>
                        </data:DataGridTemplateColumn.CellEditingTemplate>
                    </data:DataGridTemplateColumn>
                    <data:DataGridTextColumn Header="Actual Hours"
                                             Binding="{Binding Duration}"
                                             IsReadOnly="True" />
                    <data:DataGridTextColumn Header="Billable Hours"
                                             Binding="{Binding BillableHours, Mode=TwoWay}" />
                    <data:DataGridTextColumn Header="Reason"
                                             Binding="{Binding HoursAdjustmentReason, Mode=TwoWay}" />
                </data:DataGrid.Columns>
            </data:DataGrid>

        </Grid>
    </controlsToolkit:BusyIndicator>
</UserControl>